<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/INTE_USERNAME.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/INTE_USERNAME.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'User_Id',
                footer: "Foots",
                cnName: '人员',
                name: 'workbusiness/INTE_USERNAME',
                url: "/INTE_USERNAME/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"UserName":"","UserNumber":"","Description":"","RoleType":""});
            const editFormOptions = ref([[{"title":"用户","field":"UserName","type":"text"},
                               {"dataKey":"添加人员","data":[],"title":"工号","field":"UserNumber","type":"select"},
                               {"title":"描述","field":"Description","type":"text"},
                               {"title":"角色类型","field":"RoleType","type":"text"}]]);
            const searchFormFields = ref({"UserName":"","UserNumber":"","Description":""});
            const searchFormOptions = ref([[{"title":"用户","field":"UserName","type":"like"},{"dataKey":"添加人员","data":[],"title":"工号","field":"UserNumber","type":"select"},{"title":"描述","field":"Description","type":"like"}]]);
            const columns = ref([{field:'User_Id',title:'User_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'UserName',title:'用户',type:'string',link:true,width:120,align:'left',sort:true},
                       {field:'UserNumber',title:'工号',type:'string',bind:{ key:'添加人员',data:[]},width:110,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,align:'left'},
                       {field:'RoleType',title:'角色类型',type:'string',width:110,align:'left'},
                       {field:'Status',title:'新建/激活/保留/废除',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
